;;;; init.el --- Where all the magic begins
;;;;
;;;; Evgeniy Sharapov, evgeniy.sharapov@gmail.com
;;;;

;; Initialize CEDET.
(load-file (expand-file-name "~/.emacs.d/extra/cedet/common/cedet.el"))

(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(define-key-after 
  (lookup-key global-map [menu-bar tools])
  [speedbar] '("Speedbar" . speedbar-frame-mode) [calendar])

(setq semantic-load-turn-useful-things-on t)

(require 'cedet)
(require 'semantic)
(require 'semanticdb)
(require 'semantic-load)

;; Enabling various SEMANTIC minor modes.  See semantic/INSTALL for more ideas.
;; Select one of the following
(semantic-load-enable-code-helpers)
;; (semantic-load-enable-guady-code-helpers)
;; (semantic-load-enable-excessive-code-helpers)

;; Enable this if you develop in semantic, or develop grammars
;; (semantic-load-enable-semantic-debugging-helpers)
;; (semantic-load-enable-code-helpers)

;; ECB
(require 'ecb)
(require 'ecb-autoloads)

;;  If you want to access speedbar using only the keyboard, do this:
;;  Using F4, you can now toggle between the speedbar frame, and the
;;  frame speedbar was started from.
(global-set-key [(f4)] 'speedbar-get-focus)
;; ECB keys
(global-set-key [(f5)]            'ecb-activate)
(global-set-key [(control f5)]    'ecb-deactivate)

(setq 
 ecb-compilation-buffer-names (quote (("*Kill Ring*") ("*Calculator*") ("*vc*") ("*vc-diff*") ("*Apropos*") ("*Occur*") ("*shell*") ("\\*[cC]ompilation.*\\*" . t) ("\\*i?grep.*\\*" . t) ("*JDEE Compile Server*") ("*Help*") ("*Completions*") ("*Backtrace*") ("*Compile-log*") ("*bsh*") ("*Messages*") ("*grep*")))
 ecb-compile-window-height 5
 ecb-compile-window-temporally-enlarge (quote both)
 ecb-compile-window-width (quote edit-window)
 ecb-layout-name "left7"
 ecb-other-window-behavior (quote edit-and-compile)
 ecb-tip-of-the-day nil
 )

(provide 'init-ecb)